﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AtomicTypes;
using NDimArrayNamespace;

namespace Memory_Access
{
    public class QUInt64Array : QLabValues.AtomicTypeArray<QUInt64>
    {
        public QUInt64Array(params int[] dimensionSize)
            : base(dimensionSize)
        {
        }
        public QUInt64Array(QUInt64[] data, params int[] dimensionSize)
            : base(data, dimensionSize)
        {
        }

        //Darko dodao 
        public QUInt64Array(QBooleanArray qba)
        {
            QUInt64[] els = new QUInt64[qba.Data.Count()];
            for (int i = 0; i < qba.Data.Count(); i++)
                els[i] = new QUInt64(qba.Data[i]);
            this.Data = (QUInt64[])els.Clone();
            this.DimensionSize = (int[])qba.DimensionSize.Clone();
        }

        //Darko dodao
        public QUInt64Array(QCharArray qca)
        {
            QUInt64[] els = new QUInt64[qca.Data.Count()];
            for (int i = 0; i < qca.Data.Count(); i++)
                els[i] = new QUInt64(qca.Data[i]);
            this.Data = (QUInt64[])els.Clone();
            this.DimensionSize = (int[])qca.DimensionSize.Clone();
        }
        //Darko dodao
        public QUInt64Array(QUInt64Array qia)
            : base(qia.Data, qia.DimensionSize)
        {
        }

        public int[] ToIntArray()
        {
            // TODO: konvertovanje NDimArraya u niz intidzera (npr a11,a21,a31,a12,a22,a32,a13,a23,a33)
            return null;
        }

        public QUInt64Array GetSubArray(int[][] subNDimArrayCoordinates)
        {
            NDimArray<QUInt64> tempArray = base.GetSubNDimArray(subNDimArrayCoordinates);
            return new QUInt64Array(tempArray.Data, tempArray.DimensionSize);
        }

        public override QLabValues.IQLabValueType getEnumType()
        {
            return QLabValues.IQLabValueType.QUInt64Array;
        }
    }
}
